<!DOCTYPE html>
<html lang="en" class="app">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <link rel="stylesheet" href="Public/common/src/css/bootstrap.css" type="text/css"/>
    <link rel="stylesheet" href="Public/common/src/css/animate.css" type="text/css"/>
    <link rel="stylesheet" href="Public/common/src/css/app.css" type="text/css"/>
    <link rel="stylesheet" href="Public/common/src/css/font-awesome.min.css" type="text/css"/>

</head>
<body class="">
<section class="vbox">
    <section>
        <section class="hbox stretch">
            <!-- /.aside -->
            <section id="content">
                <section class="vbox">
                    <section class="scrollable padder">
                        <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
                            <li><a href="<?php echo U('Admin/Index/home')?>"><i class="fa fa-home"></i> 首页</a></li>
                            <li class="active">品牌管理</li>
                        </ul>
                        <section class="panel panel-default">
                            <header class="panel-heading">
                                品牌列表
                            </header>
                            <div class="row wrapper">
                                <div class="col-sm-4 m-b-xs">
                                    <a href="<?php echo U('store')?>" class="btn btn-default btn-sm">添加品牌</a>
                                </div>
                            </div>
                            <div class="table-responsive">
                                <table class="table table-striped b-t b-light">
                                    <thead>
                                    <tr>
							            <td>品牌id</td>
							            <td>品牌名称</td>
							            <td>品牌Logo</td>
							            <td>排序</td>
							            <td>是否显示</td>
							            <td>操作</td>
                                    </tr>
                                    </thead>
                                    <tbody>                
                                    <?php foreach ($data['data'] as $k=>$v){?>                   
                                    <tr>
                                        <td><?php echo $v['bid']?></td>
										<td><?php echo $v['bname']?></td>
										<td>
											<img src="<?php echo $v['logo']?>" width="50px"/>
										</td>
										<td><?php echo $v['bsort']?></td>
										<?php if($v['is_show']==0){?>
                
											<td>显示</td>
										<?php }else{?> 
											<td>显示</td>
										
               <?php }?>
                                        <td>
                                            <div class="btn-group">
                                                <button data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">操作 <span class="caret"></span></button>
                                                <ul class="dropdown-menu dropdown-menu-right">
                                                    <li><a href="<?php echo U('edit',array('bid'=>$v['bid']))?>">编辑</a></li>
                                                    <li class="divider"></li>
                                                    <li><a href="javascript:del(<?php echo $v['bid']?>);">删除</a></li>
                                                </ul>
                                            </div>
                                        </td>
                                    </tr>
                                    <?php }?>
                                    </tbody>
                                </table>
                            </div>
							<div class="pagination pagination-sm pull-right">
								<?php echo $data['page']?>
							</div>
                        </section>
                    </section>
                </section>
            </section>
        </section>
    </section>
</section>
<script src="Public/common/src/js/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="Public/common/src/js/bootstrap.js"></script>
<!-- 公共 -->
<script src="Public/common/js/common.js"></script>
<link rel="stylesheet" href="Public/common/css/common.css">

		<script type="text/javascript">
			function del(bid)
			{
				if(confirm('确定删除吗?'))
				{
					location.href = 'index.php?m=Admin&c=Brand&a=del&bid=' + bid;
				}
				
			}
		</script>
</body>
</html>